// 防抖函数封装
export default (function debounce () {
  let time = null
  return function (callback, dealy = 300) {
    if (time) {
      clearTimeout(time)
    }
    time = setTimeout(() => {
      callback && callback()
    }, dealy)
  }
})()
